compute remote: get input files from other remotes
authorJoey Hess <joeyh@joeyh.name>
Tue, 4 Mar 2025 15:06:58 +0000 (11:06 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 4 Mar 2025 15:06:58 +0000 (11:06 -0400)
commit4e6324131deef2c48e1da62fc7e16082cac18b06
tree952a0bdf52169761604c5132351cb9793ab09176
parentb395bd4f56a7a8e3120278dc5bbfcc44fa512a5a
compute remote: get input files from other remotes

This needed some refactoring to avoid cycles, since Remote.Compute
cannot import Remote.List. Instead, it uses Annex.remotes. Which must be
populated by something else, but we know it has been, because something
is using Remote.Compute, which it must have found in the remote list,
which populates that.

In Remote.Compute, keyPossibilities' is called with all loggedLocations,
without the trustExclude DeadTrusted that keyLocations does. There is
another cycle there. This may be a problem if a dead repository is still
a remote.

This is missing cycle prevention, and it's certianly possible to make 2
files in the compute remote co-depend on one-another. Hopefully not in a
real world situation, but it an attacker could certainly do it. Cycle
prevention will need to be added to this.
Remote.hs
Remote/Compute.hs
Remote/List/Util.hs
TODO-compute